<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/HtSearchRq">
<NativeResult>
	<Success><xsl:value-of select="Success" /></Success>
	<xsl:if test="Success='true'">
		<Search_Criteria>
			<Rooms><xsl:value-of select="Search_Criteria/Rooms" /></Rooms>
			<Nofn><xsl:value-of select="Search_Criteria/Nofn" /></Nofn>
			<Checkin_Date><xsl:value-of select="Search_Criteria/Checkin_Date" /></Checkin_Date>
			<xsl:if test='Search_Criteria/Rooms > 0'>
				<ADLTS_1><xsl:value-of select="Search_Criteria/ADLTS_1" /></ADLTS_1>
				<CHILD_1><xsl:value-of select="Search_Criteria/CHILD_1" /></CHILD_1>
			</xsl:if>
			<xsl:if test='Search_Criteria/Rooms > 1'>
				<ADLTS_2><xsl:value-of select="Search_Criteria/ADLTS_2" /></ADLTS_2>
				<CHILD_2><xsl:value-of select="Search_Criteria/CHILD_2" /></CHILD_2>
			</xsl:if>
			<xsl:if test='Search_Criteria/Rooms > 2'>
				<ADLTS_3><xsl:value-of select="Search_Criteria/ADLTS_3" /></ADLTS_3>
				<CHILD_3><xsl:value-of select="Search_Criteria/CHILD_3" /></CHILD_3>
			</xsl:if>
		</Search_Criteria>
		<xsl:if test="session[@id != '']">
			<session>
				<id><xsl:value-of select="session/@id" /></id>
				<Currency><xsl:value-of select="session/Currency" /></Currency>
				<xsl:for-each select="session/Hotel">
					<Hotel>
						<hotel_id_youtravel><xsl:value-of select="@ID" /></hotel_id_youtravel>
						<hotel_name><xsl:value-of select="Hotel_Name" /></hotel_name>
						<youtravel_rating><xsl:value-of select="Youtravel_Rating" /></youtravel_rating>
						<official_rating><xsl:value-of select="Official_Rating" /></official_rating>
						<board_type><xsl:value-of select="Board_Type" /></board_type>
						<hotel_description><xsl:value-of select="Hotel_Desc" /></hotel_description>
                        <hotel_country><xsl:value-of select="Country" /></hotel_country>
                        <hotel_destination><xsl:value-of select="Destination" /></hotel_destination>
                        <hotel_resort><xsl:value-of select="Resort" /></hotel_resort>
						<hotel_photos><xsl:value-of select="Image" /></hotel_photos>
						<Rooms>
							<xsl:if test="Room_1 != ''">
								<Room_1>
                  <Passengers>
  									<Adults><xsl:value-of select="Room_1/Passengers/@Adults" /></Adults>
  									<Children><xsl:value-of select="Room_1/Passengers/@Children" /></Children>
  								</Passengers>
  								<xsl:for-each select="Room_1/Room">
  									<Room>
  										<ID><xsl:value-of select="./@Id" /></ID>
  										<Type><xsl:value-of select="./Type" /></Type>
  										<Board><xsl:value-of select="./Board" /></Board>
  										<Rate><xsl:value-of select="./Rates/@Final_Rate" /></Rate>
  									</Room>
  								</xsl:for-each>
                </Room_1>  
							</xsl:if>
							<xsl:if test="Room_2 != ''">
								<Room_2>
  								<Passengers>
  									<Adults><xsl:value-of select="Room_2/Passengers/@Adults" /></Adults>
  									<Children><xsl:value-of select="Room_2/Passengers/@Children" /></Children>
  								</Passengers>
  								<xsl:for-each select="Room_2/Room">
  									<Room>
  										<ID><xsl:value-of select="./@Id" /></ID>
  										<Type><xsl:value-of select="./Type" /></Type>
  										<Board><xsl:value-of select="./Board" /></Board>
  										<Rate><xsl:value-of select="./Rates/@Final_Rate" /></Rate>
  									</Room>
  								</xsl:for-each>
								</Room_2>
							</xsl:if>
							<xsl:if test="Room_3 != ''">
								<Room_3>
  								<Passengers>
  									<Adults><xsl:value-of select="Room_3/Passengers/@Adults" /></Adults>
  									<Children><xsl:value-of select="Room_3/Passengers/@Children" /></Children>
  								</Passengers>
  								<xsl:for-each select="Room_3/Room">
  									<Room>
  										<ID><xsl:value-of select="./@Id" /></ID>
  										<Type><xsl:value-of select="./Type" /></Type>
  										<Board><xsl:value-of select="./Board" /></Board>
  										<Rate><xsl:value-of select="./Rates/@Final_Rate" /></Rate>
  									</Room>
  								</xsl:for-each>
                </Room_3>  
							</xsl:if>
						</Rooms>
						<facility></facility>
					</Hotel>
				</xsl:for-each>
			</session>
		</xsl:if>
	</xsl:if>
</NativeResult>
</xsl:template>
</xsl:stylesheet>